Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix check links i18n (close #1694) #1780

Merged
merged 3 commits into from
Feb 26, 2022

Conversation

southerntofu
Copy link
Contributor

I faced the same problem as described in #1694. I added the fix suggested over there, as well as a test: internal link in blog/_index.fr.md panics the whole build on the current next branch but passes with this test

southerntofu added 2 commits February 25, 2022 19:58
Display more advanced information in case of a future crash here
…la#1694

It appears linking to another translated page does not trigger the bug,
but linking to a section within the same (translated) page does.
@southerntofu southerntofu changed the base branch from master to next February 25, 2022 19:28
// NOTE: This will also match _index.foobar.md where foobar is not a language
// I don't think this is supported by zola so nothing should be broken
// Will also prevent having a section like content/_index.foobar/_index.md
if md_path.contains("/_index.") {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the root section starts with /? I can't remember

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very good point i removed the / as initially suggested on #1694. I added a note in the docs that any page whose path contains _index. is unsupported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants